<div class="form">
    <?php
    /** @var FichaController $this */
    /** @var Ficha $model */
    /** @var AweActiveForm $form */
    $form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
        'id' => 'ficha-form',
        'enableAjaxValidation' => false,
        'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,),
        'enableClientValidation' => true,
//        'htmlOptions' => array(
//            'enctype' => 'multipart/form-data',
//        ),
    ));
    ?>

    <p class="note">
        <?php echo Yii::t('AweCrud.app', 'Fields with') ?> <span class="required">*</span>
        <?php echo Yii::t('AweCrud.app', 'are required') ?>.    </p>

    <?php echo $form->errorSummary($model) ?>

    <div class="span7 separator-form"  >
        1.Datos Personales
    </div>
    <?php echo $form->textFieldRow($model, 'cedula', array('class' => 'span5', 'maxlength' => 10)) ?>
    <?php echo $form->textFieldRow($model, 'apellidos', array('class' => 'span5', 'maxlength' => 50)) ?>
    <?php echo $form->textFieldRow($model, 'nombres', array('class' => 'span5', 'maxlength' => 50)) ?>
    <?php echo $form->dropDownListRow($model, 'id_carrera', CHtml::listData(Carrera::model()->findAll(), 'id', Carrera::representingColumn()), array('empty' => '- Seleccione -')) ?>
    <?php echo $form->dropDownListRow($model, 'nivel', Ficha::model()->NivelesOptions, array('empty' => '- Seleccione -')) ?>
    <?php
//    $form->widget('bootstrap.widgets.TbFileUpload', array(
//        'url' => $this->createUrl("ficha/upload"),
//        'model' => $model,
////        'attribute' => 'picture', // see the attribute?
//        'name' => 'alex',
////        'multiple' => true,
//        'options' => array(
//            'autoUpload' => true,
//            'maxFileSize' => 2000000,
//            'acceptFileTypes' => 'js:/(\.|\/)(gif|jpe?g|png)$/i',
//    )));
    ?>
    <?php
    echo $form->datepickerRow($model, 'fecha_nacimiento', array(
        'options' => array('format' => 'yyyy-mm-dd',
            'weekStart' => 1,)
            )
    );
    ?>
    <?php echo $form->textFieldRow($model, 'lugar_nacimiento', array('class' => 'span5', 'maxlength' => 50)) ?>
    <?php echo $form->textFieldRow($model, 'dir_calleprin', array('class' => 'span5', 'maxlength' => 50)) ?>
    <?php echo $form->textFieldRow($model, 'dir_callesec', array('class' => 'span5', 'maxlength' => 50)) ?>
    <?php echo $form->textFieldRow($model, 'dir_ncasa', array('class' => 'span5', 'maxlength' => 10)) ?>
    <?php echo $form->textFieldRow($model, 'tel_convencional', array('class' => 'span5', 'maxlength' => 20)) ?>
    <?php echo $form->textFieldRow($model, 'tel_celular', array('class' => 'span5', 'maxlength' => 20)) ?>
    <?php echo $form->textFieldRow($model, 'correo', array('class' => 'span5', 'maxlength' => 50)) ?>

    <?php ?>

    <?php //echo $form->textFieldRow($model, 'foto', array('class' => 'span5', 'maxlength' => 100))       ?>
    <div class="span7 separator-form"  >
        2. Contacto en caso de Emergencia
    </div>

    <?php echo $form->textFieldRow($model, 'emer_nombre', array('class' => 'span5', 'maxlength' => 100)) ?>
    <?php echo $form->textFieldRow($model, 'emer_telefono', array('class' => 'span5', 'maxlength' => 20)) ?>
    <?php echo $form->textFieldRow($model, 'emer_direccion', array('class' => 'span5', 'maxlength' => 100)) ?>
    <?php //echo $form->textFieldRow($model, 'fecha_creacion', array('class' => 'span5')) ?>
    <div class="form-actions">
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            //'buttonType'=>'submit',
            'label' => Yii::t('AweCrud.app', 'Cancel'),
            'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
        ));
        ?>
    </div>

    <?php $this->endWidget(); ?>
</div>




